//
//  SWAccount.h
//  MissMedia
//
//  Created by linhan on 16/3/31.
//  Copyright © 2016年 Miss. All rights reserved.
//


#import <Mantle.h>

typedef NS_ENUM(NSInteger, SWGender) {
    Unknow = 0,
    Male,
    Female
};

typedef NS_ENUM(NSInteger, SWRole) {
    Mother = 0,
    Father,
    Grandma,
    Grandpa,
    Grandmother,
    Grandfather,
    Uncle,
    Aunt,
    Brother,
    Other
};

@interface SWToken:MTLModel
@property (nonatomic, strong) NSString  *uid;
@property (nonatomic, strong) NSString  *token;
@property (nonatomic, assign) NSNumber  *expires;
@end

@interface SWBaseUser:MTLModel
@property (nonatomic, strong) NSString  *screenName;
@property (nonatomic, strong) NSString  *avatarURL;
@property (nonatomic, strong) NSString  *uid;//如果是第三方登录，则uid这是这个平台的用户唯一id
@property (nonatomic, assign) SWGender  gender;
@end

@interface SWUser : SWBaseUser
@property (nonatomic, strong) NSString  *city;
@property (nonatomic, strong) NSString  *desc;
@end

//第三方账号
@interface SWConnectionAccount:SWBaseUser
@property (nonatomic, strong) NSString  *unionID;
@property (nonatomic, strong) SWToken   *token;
@property (nonatomic, strong) NSString  *location;
@end

@interface SWMainAccount:SWUser
@property (nonatomic, strong) SWToken   *token;
@property (nonatomic, strong) SWConnectionAccount   *weiboAccount;
@property (nonatomic, strong) SWConnectionAccount   *wechatAccount;
@property (nonatomic, strong) NSString  *familyID;
@property (nonatomic, strong) NSString  *shortName;
@property (nonatomic, strong) NSString  *phone;
@property (nonatomic, strong) NSDate  *birthday;
@property (nonatomic, strong) NSArray   *children;   //孩子的数组
@end

//孩子
@interface SWChild:SWBaseUser
@property (nonatomic, strong) NSString  *infantName;//乳名
@property (nonatomic, strong) NSDate  *birthday;
@end

